
#include <webots/Field.hpp>
#include <webots/Node.hpp>


#include <ros/ros.h>
#include <math.h>
//#include <string.hpp>
#include <stdio.h>
#include <std_msgs/String.h>

// %EndTag(MSG_HEADER)%

#include <sstream>


#include <iostream>
#include <string>
#include <cstring>

using namespace std;
using namespace webots;



class WDynObjMarker
{
public:
  WDynObjMarker();
  ~WDynObjMarker();
  void init(const webots::Node* ,string);
  void set_position(const double*);
  const double* get_position();

private:
  const webots::Node* NH;
  webots::Field* Name;
  webots::Field* Pos;
};

WDynObjMarker::WDynObjMarker()
{

}
WDynObjMarker::~WDynObjMarker()
{
  NH->cleanup();
}

void WDynObjMarker::init(const webots::Node* nodeh,string name)
{
  NH = nodeh;
  Name = NH->getField("name");
  Pos = NH->getField("translation");
  Name->setSFString(name);
}

void WDynObjMarker::set_position(const double* pos)
{
  Pos->setSFVec3f(pos);
}

const double* WDynObjMarker::get_position()
{
  return (Pos->getSFVec3f());
}
